#include <iostream>
#include <ratio>
int main() {
  typedef std::ratio<3, 4> three_four;
  typedef std::ratio<4, 5> four_five;
  typedef std::ratio_add<three_four, four_five> result_add; // 3,4+3/5
  typedef std::ratio_divide<three_four, four_five>
      result_divide;                                            // 3 / 4 / 4 /5
  typedef std::ratio_equal<three_four, four_five> result_equal; // 3/4 == 4/5
  typedef std::ratio_greater<three_four, four_five> result_geater; // 3/4>=4/5
  typedef std::ratio_greater_equal<three_four, four_five>
      result_geater_equal;                                    // 3/4>=4/5
  typedef std::ratio_less<three_four, four_five> result_less; // 3/4<4/5
  typedef std::ratio_less_equal<three_four, four_five>
      result_less_equal; // 3/4<=4/5
  typedef std::ratio_multiply<three_four, four_five> result_multiply; // 3/4
                                                                      // *4/5
  typedef std::ratio_not_equal<three_four, four_five>
      result_not_equal; // 3/4 != 4/5
  typedef std::ratio_subtract<three_four, four_five>
      result_substract; // 3/4-4/5
  std::cout << "add result = " << result_add::num << '/' << result_add::den
            << "=" << static_cast<double>(result_add::num) / result_add::den
            << "\n";

  std::cout << "divide result = " << result_divide::num << '/'
            << result_add::den << "="
            << static_cast<double>(result_divide::num) / result_divide::den
            << "\n";
  std::cout << "equal result = " << std::boolalpha << result_equal::value
            << "\n";
  std::cout << "geater result = " << std::boolalpha << result_geater::value
            << "\n";
  std::cout << "geater equal result = " << std::boolalpha
            << result_geater_equal::value << "\n";
  std::cout << "less result = " << std::boolalpha << result_less::value << "\n";
  std::cout << "less equal result = " << std::boolalpha
            << result_less_equal::value << "\n";
  std::cout << "multiply result = " << result_multiply::num << '/'
            << result_multiply::den << "="
            << static_cast<double>(result_multiply::num) / result_multiply::den
            << "\n";
  std::cout << "not equal result = " << std::boolalpha
            << result_not_equal::value << "\n";
  std::cout << "subtract result = " << result_substract::num << '/'
            << result_substract::den << "="
            << static_cast<double>(result_substract::num) /
                   result_substract::den
            << "\n";
}
